﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using Teigha.Core;

namespace Teigha.TD
{
	public class OdDbMLeader : OdDbEntity
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdDbMLeader(IntPtr cPtr, bool cMemoryOwn) : base(TD_DbPINVOKE.OdDbMLeader_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdDbMLeader obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdDbMLeader()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							TD_DbPINVOKE.delete_OdDbMLeader(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new static OdDbMLeader cast(OdRxObject pObj)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbMLeader_cast(OdRxObject.getCPtr(pObj));
			OdDbMLeader result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbMLeader)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbMLeader)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbMLeader)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdRxClass desc()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbMLeader_desc(), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxClass isA()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbMLeader_isA(this.swigCPtr), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxObject queryX(OdRxClass protocolClass)
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbMLeader_queryX(this.swigCPtr, OdRxClass.getCPtr(protocolClass)), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdDbMLeader createObject()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbMLeader_createObject();
			OdDbMLeader result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbMLeader)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbMLeader)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbMLeader)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult dwgInFields(OdDbDwgFiler filer)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_dwgInFields(this.swigCPtr, OdDbDwgFiler.getCPtr(filer));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dwgOutFields(OdDbDwgFiler filer)
		{
			TD_DbPINVOKE.OdDbMLeader_dwgOutFields(this.swigCPtr, OdDbDwgFiler.getCPtr(filer));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult dxfInFields(OdDbDxfFiler filer)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_dxfInFields(this.swigCPtr, OdDbDxfFiler.getCPtr(filer));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dxfOutFields(OdDbDxfFiler filer)
		{
			TD_DbPINVOKE.OdDbMLeader_dxfOutFields(this.swigCPtr, OdDbDxfFiler.getCPtr(filer));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setOverride(OdDbMLeader.PropertyOverrideType propertyType, bool isOverride)
		{
			TD_DbPINVOKE.OdDbMLeader_setOverride__SWIG_0(this.swigCPtr, (int)propertyType, isOverride);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setOverride(OdDbMLeader.PropertyOverrideType propertyType)
		{
			TD_DbPINVOKE.OdDbMLeader_setOverride__SWIG_1(this.swigCPtr, (int)propertyType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isOverride(OdDbMLeader.PropertyOverrideType propertyType)
		{
			bool result = TD_DbPINVOKE.OdDbMLeader_isOverride__SWIG_0(this.swigCPtr, (int)propertyType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setScale(double scale)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_setScale(this.swigCPtr, scale);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double scale()
		{
			double result = TD_DbPINVOKE.OdDbMLeader_scale(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getBlockAttributeValue(OdDbObjectId attdefId, out OdDbAttribute pAtt)
		{
			IntPtr zero = IntPtr.Zero;
			OdResult result;
			try
			{
				OdResult odResult = (OdResult)TD_DbPINVOKE.OdDbMLeader_getBlockAttributeValue(this.swigCPtr, OdDbObjectId.getCPtr(attdefId), out zero);
				if (TD_DbPINVOKE.SWIGPendingException.Pending)
				{
					throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
				}
				result = odResult;
			}
			finally
			{
				pAtt = (OdDbAttribute)Teigha.Core.Helpers.odrxCreateObjectInternal(zero, true);
			}
			return result;
		}

		public OdResult setBlockAttributeValue(OdDbObjectId attdefId, OdDbAttribute pAtt)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_setBlockAttributeValue(this.swigCPtr, OdDbObjectId.getCPtr(attdefId), OdDbAttribute.getCPtr(pAtt));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePlane plane()
		{
			OdGePlane result = new OdGePlane(TD_DbPINVOKE.OdDbMLeader_plane(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setPlane(OdGePlane plane)
		{
			TD_DbPINVOKE.OdDbMLeader_setPlane(this.swigCPtr, OdGePlane.getCPtr(plane));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeVector3d normal()
		{
			OdGeVector3d result = new OdGeVector3d(TD_DbPINVOKE.OdDbMLeader_normal(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult moveMLeader(OdGeVector3d vector, OdDbMLeader.MoveType moveType, bool bAutoSwitchDogleg)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_moveMLeader__SWIG_0(this.swigCPtr, OdGeVector3d.getCPtr(vector), (int)moveType, bAutoSwitchDogleg);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult moveMLeader(OdGeVector3d vector, OdDbMLeader.MoveType moveType)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_moveMLeader__SWIG_1(this.swigCPtr, OdGeVector3d.getCPtr(vector), (int)moveType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getContentGeomExtents(OdGeExtents3d extents)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_getContentGeomExtents(this.swigCPtr, OdGeExtents3d.getCPtr(extents));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void getLeaderIndexes(OdIntArray leaderIndexes)
		{
			TD_DbPINVOKE.OdDbMLeader_getLeaderIndexes(this.swigCPtr, OdIntArray.getCPtr(leaderIndexes).Handle);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void addLeader(out int leaderIndex)
		{
			TD_DbPINVOKE.OdDbMLeader_addLeader(this.swigCPtr, out leaderIndex);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void removeLeader(int leaderIndex)
		{
			TD_DbPINVOKE.OdDbMLeader_removeLeader(this.swigCPtr, leaderIndex);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void getLeaderLineIndexes(OdIntArray leaderLineIndexes)
		{
			TD_DbPINVOKE.OdDbMLeader_getLeaderLineIndexes__SWIG_0(this.swigCPtr, OdIntArray.getCPtr(leaderLineIndexes).Handle);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdResult addLeaderLine(int leaderIndex, out int leaderLineIndex)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_addLeaderLine__SWIG_0(this.swigCPtr, leaderIndex, out leaderLineIndex);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult addLeaderLine(OdGePoint3d point, out int leaderLineIndex)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_addLeaderLine__SWIG_1(this.swigCPtr, OdGePoint3d.getCPtr(point), out leaderLineIndex);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void removeLeaderLine(int leaderLineIndex)
		{
			TD_DbPINVOKE.OdDbMLeader_removeLeaderLine(this.swigCPtr, leaderLineIndex);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdResult addFirstVertex(int leaderLineIndex, OdGePoint3d point)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_addFirstVertex(this.swigCPtr, leaderLineIndex, OdGePoint3d.getCPtr(point));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult removeFirstVertex(int leaderLineIndex)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_removeFirstVertex(this.swigCPtr, leaderLineIndex);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getFirstVertex(int leaderLineIndex, OdGePoint3d point)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_getFirstVertex(this.swigCPtr, leaderLineIndex, OdGePoint3d.getCPtr(point));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setFirstVertex(int leaderLineIndex, OdGePoint3d point)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_setFirstVertex(this.swigCPtr, leaderLineIndex, OdGePoint3d.getCPtr(point));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult addLastVertex(int leaderLineIndex, OdGePoint3d point)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_addLastVertex(this.swigCPtr, leaderLineIndex, OdGePoint3d.getCPtr(point));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult removeLastVertex(int leaderLineIndex)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_removeLastVertex(this.swigCPtr, leaderLineIndex);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getLastVertex(int leaderLineIndex, OdGePoint3d point)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_getLastVertex(this.swigCPtr, leaderLineIndex, OdGePoint3d.getCPtr(point));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setLastVertex(int leaderLineIndex, OdGePoint3d point)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_setLastVertex(this.swigCPtr, leaderLineIndex, OdGePoint3d.getCPtr(point));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult numVertices(int leaderLineIndex, out int num)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_numVertices(this.swigCPtr, leaderLineIndex, out num);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setVertex(int leaderLineIndex, int index, OdGePoint3d point)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_setVertex(this.swigCPtr, leaderLineIndex, index, OdGePoint3d.getCPtr(point));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void getVertex(int leaderLineIndex, int index, OdGePoint3d point)
		{
			TD_DbPINVOKE.OdDbMLeader_getVertex(this.swigCPtr, leaderLineIndex, index, OdGePoint3d.getCPtr(point));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void getLeaderIndex(int leaderLineIndex, out int leaderIndex)
		{
			TD_DbPINVOKE.OdDbMLeader_getLeaderIndex(this.swigCPtr, leaderLineIndex, out leaderIndex);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void getLeaderLineIndexes(int leaderIndex, OdIntArray leaderLineIndexes)
		{
			TD_DbPINVOKE.OdDbMLeader_getLeaderLineIndexes__SWIG_1(this.swigCPtr, leaderIndex, OdIntArray.getCPtr(leaderLineIndexes).Handle);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setDoglegDirection(int leaderIndex, OdGeVector3d vector)
		{
			TD_DbPINVOKE.OdDbMLeader_setDoglegDirection(this.swigCPtr, leaderIndex, OdGeVector3d.getCPtr(vector));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void getDoglegDirection(int leaderIndex, OdGeVector3d vector)
		{
			TD_DbPINVOKE.OdDbMLeader_getDoglegDirection(this.swigCPtr, leaderIndex, OdGeVector3d.getCPtr(vector));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setLeaderLineType(OdDbMLeaderStyle.LeaderType leaderLineType)
		{
			TD_DbPINVOKE.OdDbMLeader_setLeaderLineType__SWIG_0(this.swigCPtr, (int)leaderLineType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMLeaderStyle.LeaderType leaderLineType()
		{
			OdDbMLeaderStyle.LeaderType result = (OdDbMLeaderStyle.LeaderType)TD_DbPINVOKE.OdDbMLeader_leaderLineType__SWIG_0(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setLeaderLineColor(OdCmColor leaderLineColor)
		{
			TD_DbPINVOKE.OdDbMLeader_setLeaderLineColor__SWIG_0(this.swigCPtr, OdCmColor.getCPtr(leaderLineColor));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdCmColor leaderLineColor()
		{
			OdCmColor result = new OdCmColor(TD_DbPINVOKE.OdDbMLeader_leaderLineColor__SWIG_0(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setLeaderLineTypeId(OdDbObjectId leaderLineTypeId)
		{
			TD_DbPINVOKE.OdDbMLeader_setLeaderLineTypeId__SWIG_0(this.swigCPtr, OdDbObjectId.getCPtr(leaderLineTypeId));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbObjectId leaderLineTypeId()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbMLeader_leaderLineTypeId__SWIG_0(this.swigCPtr);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setLeaderLineWeight(LineWeight leaderLineWeight)
		{
			TD_DbPINVOKE.OdDbMLeader_setLeaderLineWeight__SWIG_0(this.swigCPtr, (int)leaderLineWeight);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public LineWeight leaderLineWeight()
		{
			LineWeight result = (LineWeight)TD_DbPINVOKE.OdDbMLeader_leaderLineWeight__SWIG_0(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setLandingGap(double landingGap)
		{
			TD_DbPINVOKE.OdDbMLeader_setLandingGap(this.swigCPtr, landingGap);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double landingGap()
		{
			double result = TD_DbPINVOKE.OdDbMLeader_landingGap(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setEnableLanding(bool enableLanding)
		{
			TD_DbPINVOKE.OdDbMLeader_setEnableLanding(this.swigCPtr, enableLanding);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool enableLanding()
		{
			bool result = TD_DbPINVOKE.OdDbMLeader_enableLanding(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setEnableDogleg(bool enableDogleg)
		{
			TD_DbPINVOKE.OdDbMLeader_setEnableDogleg(this.swigCPtr, enableDogleg);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool enableDogleg()
		{
			bool result = TD_DbPINVOKE.OdDbMLeader_enableDogleg(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setDoglegLength(int leaderIndex, double dDoglegLength)
		{
			TD_DbPINVOKE.OdDbMLeader_setDoglegLength__SWIG_0(this.swigCPtr, leaderIndex, dDoglegLength);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double doglegLength(int leaderIndex)
		{
			double result = TD_DbPINVOKE.OdDbMLeader_doglegLength__SWIG_0(this.swigCPtr, leaderIndex);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setDoglegLength(double doglegLength)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_setDoglegLength__SWIG_1(this.swigCPtr, doglegLength);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double doglegLength()
		{
			double result = TD_DbPINVOKE.OdDbMLeader_doglegLength__SWIG_1(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setArrowSymbolId(OdDbObjectId arrowSymbolId)
		{
			TD_DbPINVOKE.OdDbMLeader_setArrowSymbolId__SWIG_0(this.swigCPtr, OdDbObjectId.getCPtr(arrowSymbolId));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbObjectId arrowSymbolId()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbMLeader_arrowSymbolId__SWIG_0(this.swigCPtr);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setArrowSize(double arrowSize)
		{
			TD_DbPINVOKE.OdDbMLeader_setArrowSize__SWIG_0(this.swigCPtr, arrowSize);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double arrowSize()
		{
			double result = TD_DbPINVOKE.OdDbMLeader_arrowSize__SWIG_0(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setContentType(OdDbMLeaderStyle.ContentType contentType)
		{
			TD_DbPINVOKE.OdDbMLeader_setContentType(this.swigCPtr, (int)contentType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMLeaderStyle.ContentType contentType()
		{
			OdDbMLeaderStyle.ContentType result = (OdDbMLeaderStyle.ContentType)TD_DbPINVOKE.OdDbMLeader_contentType(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTextStyleId(OdDbObjectId textStyleId)
		{
			TD_DbPINVOKE.OdDbMLeader_setTextStyleId(this.swigCPtr, OdDbObjectId.getCPtr(textStyleId));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbObjectId textStyleId()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbMLeader_textStyleId(this.swigCPtr);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTextAttachmentType(OdDbMLeaderStyle.TextAttachmentType textAttachmentType, OdDbMLeaderStyle.LeaderDirectionType leaderDirection)
		{
			TD_DbPINVOKE.OdDbMLeader_setTextAttachmentType(this.swigCPtr, (int)textAttachmentType, (int)leaderDirection);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMLeaderStyle.TextAttachmentType textAttachmentType(OdDbMLeaderStyle.LeaderDirectionType leaderDirection)
		{
			OdDbMLeaderStyle.TextAttachmentType result = (OdDbMLeaderStyle.TextAttachmentType)TD_DbPINVOKE.OdDbMLeader_textAttachmentType(this.swigCPtr, (int)leaderDirection);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTextAngleType(OdDbMLeaderStyle.TextAngleType textAngleType)
		{
			TD_DbPINVOKE.OdDbMLeader_setTextAngleType(this.swigCPtr, (int)textAngleType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMLeaderStyle.TextAngleType textAngleType()
		{
			OdDbMLeaderStyle.TextAngleType result = (OdDbMLeaderStyle.TextAngleType)TD_DbPINVOKE.OdDbMLeader_textAngleType(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTextAlignmentType(OdDbMLeaderStyle.TextAlignmentType textAlignmentType)
		{
			TD_DbPINVOKE.OdDbMLeader_setTextAlignmentType(this.swigCPtr, (int)textAlignmentType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMLeaderStyle.TextAlignmentType textAlignmentType()
		{
			OdDbMLeaderStyle.TextAlignmentType result = (OdDbMLeaderStyle.TextAlignmentType)TD_DbPINVOKE.OdDbMLeader_textAlignmentType(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTextColor(OdCmColor textColor)
		{
			TD_DbPINVOKE.OdDbMLeader_setTextColor(this.swigCPtr, OdCmColor.getCPtr(textColor));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdCmColor textColor()
		{
			OdCmColor result = new OdCmColor(TD_DbPINVOKE.OdDbMLeader_textColor(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTextHeight(double textHeight)
		{
			TD_DbPINVOKE.OdDbMLeader_setTextHeight(this.swigCPtr, textHeight);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double textHeight()
		{
			double result = TD_DbPINVOKE.OdDbMLeader_textHeight(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setEnableFrameText(bool enableFrameText)
		{
			TD_DbPINVOKE.OdDbMLeader_setEnableFrameText(this.swigCPtr, enableFrameText);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool enableFrameText()
		{
			bool result = TD_DbPINVOKE.OdDbMLeader_enableFrameText(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setMText(OdDbMText pMText)
		{
			TD_DbPINVOKE.OdDbMLeader_setMText(this.swigCPtr, OdDbMText.getCPtr(pMText));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMText mtext()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbMLeader_mtext(this.swigCPtr);
			OdDbMText result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbMText)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbMText)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbMText)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setBlockContentId(OdDbObjectId blockId)
		{
			TD_DbPINVOKE.OdDbMLeader_setBlockContentId(this.swigCPtr, OdDbObjectId.getCPtr(blockId));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbObjectId blockContentId()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbMLeader_blockContentId(this.swigCPtr);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setBlockColor(OdCmColor blockColor)
		{
			TD_DbPINVOKE.OdDbMLeader_setBlockColor(this.swigCPtr, OdCmColor.getCPtr(blockColor));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdCmColor blockColor()
		{
			OdCmColor result = new OdCmColor(TD_DbPINVOKE.OdDbMLeader_blockColor(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setBlockScale(OdGeScale3d scale)
		{
			TD_DbPINVOKE.OdDbMLeader_setBlockScale(this.swigCPtr, OdGeScale3d.getCPtr(scale));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeScale3d blockScale()
		{
			OdGeScale3d result = new OdGeScale3d(TD_DbPINVOKE.OdDbMLeader_blockScale(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setBlockRotation(double rotation)
		{
			TD_DbPINVOKE.OdDbMLeader_setBlockRotation(this.swigCPtr, rotation);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double blockRotation()
		{
			double result = TD_DbPINVOKE.OdDbMLeader_blockRotation(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setBlockConnectionType(OdDbMLeaderStyle.BlockConnectionType blockConnectionType)
		{
			TD_DbPINVOKE.OdDbMLeader_setBlockConnectionType(this.swigCPtr, (int)blockConnectionType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMLeaderStyle.BlockConnectionType blockConnectionType()
		{
			OdDbMLeaderStyle.BlockConnectionType result = (OdDbMLeaderStyle.BlockConnectionType)TD_DbPINVOKE.OdDbMLeader_blockConnectionType(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setEnableAnnotationScale(bool enableAnnotationScale)
		{
			TD_DbPINVOKE.OdDbMLeader_setEnableAnnotationScale(this.swigCPtr, enableAnnotationScale);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool enableAnnotationScale()
		{
			bool result = TD_DbPINVOKE.OdDbMLeader_enableAnnotationScale(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setMLeaderStyle(OdDbObjectId newStyleId)
		{
			TD_DbPINVOKE.OdDbMLeader_setMLeaderStyle(this.swigCPtr, OdDbObjectId.getCPtr(newStyleId));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbObjectId MLeaderStyle()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbMLeader_MLeaderStyle(this.swigCPtr);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getOverridedMLeaderStyle(OdDbMLeaderStyle mleaderStyle)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_getOverridedMLeaderStyle(this.swigCPtr, OdDbMLeaderStyle.getCPtr(mleaderStyle));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setContextDataManager(IntPtr pContextDataManager)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_setContextDataManager(this.swigCPtr, pContextDataManager);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public IntPtr getContextDataManager()
		{
			IntPtr result = TD_DbPINVOKE.OdDbMLeader_getContextDataManager(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setBlockPosition(OdGePoint3d position)
		{
			TD_DbPINVOKE.OdDbMLeader_setBlockPosition(this.swigCPtr, OdGePoint3d.getCPtr(position));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void getBlockPosition(OdGePoint3d position)
		{
			TD_DbPINVOKE.OdDbMLeader_getBlockPosition(this.swigCPtr, OdGePoint3d.getCPtr(position));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setTextLocation(OdGePoint3d location)
		{
			TD_DbPINVOKE.OdDbMLeader_setTextLocation(this.swigCPtr, OdGePoint3d.getCPtr(location));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void getTextLocation(OdGePoint3d location)
		{
			TD_DbPINVOKE.OdDbMLeader_getTextLocation(this.swigCPtr, OdGePoint3d.getCPtr(location));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdResult setToleranceLocation(OdGePoint3d location)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_setToleranceLocation(this.swigCPtr, OdGePoint3d.getCPtr(location));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getToleranceLocation(OdGePoint3d location)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_getToleranceLocation(this.swigCPtr, OdGePoint3d.getCPtr(location));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setArrowSymbolId(int leaderLineIndex, OdDbObjectId arrowSymbolId)
		{
			TD_DbPINVOKE.OdDbMLeader_setArrowSymbolId__SWIG_1(this.swigCPtr, leaderLineIndex, OdDbObjectId.getCPtr(arrowSymbolId));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbObjectId arrowSymbolId(int leaderLineIndex)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbMLeader_arrowSymbolId__SWIG_1(this.swigCPtr, leaderLineIndex);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool hasContent()
		{
			bool result = TD_DbPINVOKE.OdDbMLeader_hasContent(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult connectionPoint(OdGeVector3d vect, OdGePoint3d point)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_connectionPoint__SWIG_0(this.swigCPtr, OdGeVector3d.getCPtr(vect), OdGePoint3d.getCPtr(point));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult connectionPoint(OdGeVector3d vect, OdGePoint3d point, OdDbMLeaderStyle.TextAttachmentDirection direction)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_connectionPoint__SWIG_1(this.swigCPtr, OdGeVector3d.getCPtr(vect), OdGePoint3d.getCPtr(point), (int)direction);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult recomputeBreakPoints()
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_recomputeBreakPoints(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult postMLeaderToDb(OdDbDatabase pDb)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_postMLeaderToDb(this.swigCPtr, OdDbDatabase.getCPtr(pDb));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult updateLeaderLinePosition()
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_updateLeaderLinePosition(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult removeLeaderLineRefAssoc(int leaderLineIndex)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_removeLeaderLineRefAssoc(this.swigCPtr, leaderLineIndex);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult updateContentScale(OdDbMLeaderObjectContextData pContext)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_updateContentScale(this.swigCPtr, OdDbMLeaderObjectContextData.getCPtr(pContext));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool isPlanar()
		{
			bool result = TD_DbPINVOKE.OdDbMLeader_isPlanar(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getPlane(OdGePlane plane, out Planarity planarity)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeader_getPlane(this.swigCPtr, OdGePlane.getCPtr(plane), out planarity);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTextAttachmentDirection(OdDbMLeaderStyle.TextAttachmentDirection direction)
		{
			TD_DbPINVOKE.OdDbMLeader_setTextAttachmentDirection(this.swigCPtr, (int)direction);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMLeaderStyle.TextAttachmentDirection textAttachmentDirection()
		{
			OdDbMLeaderStyle.TextAttachmentDirection result = (OdDbMLeaderStyle.TextAttachmentDirection)TD_DbPINVOKE.OdDbMLeader_textAttachmentDirection(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isOverride(int leaderLineIndex, OdDbMLeader.LeaderLineOverrideType value)
		{
			bool result = TD_DbPINVOKE.OdDbMLeader_isOverride__SWIG_1(this.swigCPtr, leaderLineIndex, (int)value);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setLeaderLineType(int leaderLineIndex, OdDbMLeaderStyle.LeaderType leaderLineType)
		{
			TD_DbPINVOKE.OdDbMLeader_setLeaderLineType__SWIG_1(this.swigCPtr, leaderLineIndex, (int)leaderLineType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMLeaderStyle.LeaderType leaderLineType(int leaderLineIndex)
		{
			OdDbMLeaderStyle.LeaderType result = (OdDbMLeaderStyle.LeaderType)TD_DbPINVOKE.OdDbMLeader_leaderLineType__SWIG_1(this.swigCPtr, leaderLineIndex);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setLeaderLineColor(int leaderLineIndex, OdCmColor leaderLineColor)
		{
			TD_DbPINVOKE.OdDbMLeader_setLeaderLineColor__SWIG_1(this.swigCPtr, leaderLineIndex, OdCmColor.getCPtr(leaderLineColor));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdCmColor leaderLineColor(int leaderLineIndex)
		{
			OdCmColor result = new OdCmColor(TD_DbPINVOKE.OdDbMLeader_leaderLineColor__SWIG_1(this.swigCPtr, leaderLineIndex), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setLeaderLineTypeId(int leaderLineIndex, OdDbObjectId leaderLineTypeId)
		{
			TD_DbPINVOKE.OdDbMLeader_setLeaderLineTypeId__SWIG_1(this.swigCPtr, leaderLineIndex, OdDbObjectId.getCPtr(leaderLineTypeId));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbObjectId leaderLineTypeId(int leaderLineIndex)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbMLeader_leaderLineTypeId__SWIG_1(this.swigCPtr, leaderLineIndex);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setLeaderLineWeight(int leaderLineIndex, LineWeight leaderLineWeight)
		{
			TD_DbPINVOKE.OdDbMLeader_setLeaderLineWeight__SWIG_1(this.swigCPtr, leaderLineIndex, (int)leaderLineWeight);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public LineWeight leaderLineWeight(int leaderLineIndex)
		{
			LineWeight result = (LineWeight)TD_DbPINVOKE.OdDbMLeader_leaderLineWeight__SWIG_1(this.swigCPtr, leaderLineIndex);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setArrowSize(int leaderLineIndex, double arrowSize)
		{
			TD_DbPINVOKE.OdDbMLeader_setArrowSize__SWIG_1(this.swigCPtr, leaderLineIndex, arrowSize);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double arrowSize(int leaderLineIndex)
		{
			double result = TD_DbPINVOKE.OdDbMLeader_arrowSize__SWIG_1(this.swigCPtr, leaderLineIndex);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setExtendLeaderToText(bool bSet)
		{
			TD_DbPINVOKE.OdDbMLeader_setExtendLeaderToText(this.swigCPtr, bSet);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool extendLeaderToText()
		{
			bool result = TD_DbPINVOKE.OdDbMLeader_extendLeaderToText(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		public enum MoveType
		{
			kMoveAllPoints,
			kMoveAllExceptArrowHeaderPoints,
			kMoveContentAndDoglegPoints
		}

		public enum gsMarkType
		{
			kNone,
			kArrowMark,
			kLeaderLineMark = 5001,
			kDoglegMark = 10001,
			kMTextMark = 15001,
			kMTextUnderLineMark,
			kToleranceMark,
			kBlockMark,
			kBlockAttribute
		}

		public enum PropertyOverrideType
		{
			kLeaderLineType,
			kLeaderLineColor,
			kLeaderLineTypeId,
			kLeaderLineWeight,
			kEnableLanding,
			kLandingGap,
			kEnableDogleg,
			kDoglegLength,
			kArrowSymbolId,
			kArrowSize,
			kContentType,
			kTextStyleId,
			kTextLeftAttachmentType,
			kTextAngleType,
			kTextAlignmentType,
			kTextColor,
			kTextHeight,
			kEnableFrameText,
			kDefaultMText,
			kBlockId,
			kBlockColor,
			kBlockScale,
			kBlockRotation,
			kBlockConnectionType,
			kScale,
			kTextRightAttachmentType,
			kTextSwitchAlignmentType,
			kTextAttachmentDirection,
			kTextTopAttachmentType,
			kTextBottomAttachmentType,
			kExtendLeaderToText,
			kSize
		}

		public enum LeaderLineOverrideType
		{
			kOverrideLeaderType,
			kOverrideLineColor,
			kOverrideLineTypeId,
			kOverrideLineWeight,
			kOverrideArrowSize,
			kOverrideArrowSymbolId
		}
	}
}
